$(function(){
	var sys_lang;
	switch(getcookie('sys_lang')){
	    case '17e7U1FSAFQIVQQGAVMGVgAGVwJRVgdVAAhSWgdPXxtaCA':
	    	languagesetecd('zh-cn');
	    	$("#footer_en, .about_en").remove();
	    break;	
	    default:
	    	languagesetecd('en');
	    	$("#footer_zh, .about_zh").remove();
	}
    $("#language a").click(function(){
    	 	var language = $(this).attr("title");
    	 	delcookie("sys_lang");
		    switch(language){
		         case  'zh-cn':
		        	 setcookie("sys_lang",'17e7U1FSAFQIVQQGAVMGVgAGVwJRVgdVAAhSWgdPXxtaCA');
		             break;
		         case   'en':
		        	 setcookie("sys_lang",'0392B1EJCFNRCVEIAgNQAAJWUFpTUQYCVwUAUFNdXw');
		             break;  
		     } 
		 location.href=removeAnchor(location.href);
    });
    	
})
		
function removeAnchor(a) {
    pos = a.indexOf("?");
    if (pos > 0) {
        return a.substring(0, pos)
    }
    return a
}
 
function languagesetecd(val){
  $("#language a[title="+val+"]").addClass("none").siblings().removeClass("none");
}



function doPrint() { 
	bdhtml=window.document.body.innerHTML; 
	sprnstr="<!--startprint-->"; 
	eprnstr="<!--endprint-->"; 
	prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); 
	prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); 
	window.document.body.innerHTML=prnhtml; 
	window.print(); 
} 




(function($) {
    $.fn.placeholder = function() {
        var searchText = this;
        var searchValue = searchText.attr('placeholder');

        if (!('placeholder' in document.createElement('input'))) {
            searchText.bind('focus', function() {
                if ($(this).val() == searchValue) { $(this).val(""); };
            }).bind('blur', function() {
                if ($(this).val() == '') { $(this).val(searchValue); };
            });

        } else {
            searchText.bind('focus', function() {
                if (jQuery(this).attr('placeholder') == searchValue) { jQuery(this).attr('placeholder', '') };
            }).bind('blur', function() {
                if (jQuery(this).attr('placeholder', '')) { jQuery(this).attr('placeholder', searchValue) };
            });
        }
    }
})(jQuery);